<?php include $this->header();?>

<div class="pd mt bd bg">
    <span class="ui-icon ui-icon-search" style="position:absolute; left:14px;"></span>
    <span>
        按类型显示：
        <select name="select_option_type" id="select_option_type">
          <option value="<?=UE_Url::make("$app/$ctl/$act")?>" <?php if (!$id) {?>selected="selected"<?php }?>>显示全部</option>
          <?php foreach($optionTypes as $optionType) { ?>
          <option value="<?=UE_Url::make("$app/$ctl/$act/${optionType['option_type']}")?>" <?php if($optionType['option_type'] == $id){?>selected="selected"<?php }?>><?=$optionType['option_type_name']?></option>
          <?php } ?>
        </select>
        <script type="text/javascript">
		    $('#select_option_type').change(function() {window.location.replace(this.value);});
		</script>
		
  </span>
</div>
<div>
    <div class="bd p1 mt">
      <form method="post" target="_self" id="type_add" onsubmit="return Validator.Validate(this)" onreset="return Validator.Validate(this)">
          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="rank list">
              <tr class="th">
                <td width="150" align="center" valign="top">属性名称</td>
                <td width="160" align="center">属性值</td>
                <td width="60" align="center" bgcolor="#EFEFEF">类型</td>
                <td width="70" align="center" bgcolor="#EFEFEF">输入格式</td>
                <td width="50" align="center" bgcolor="#EFEFEF">排序</td>
                <td align="center" bgcolor="#EFEFEF">描述</td>
                <td width="120" align="center" bgcolor="#EFEFEF">操作</td>
              </tr>
              <?php if ($options) : ?>
              <?php foreach($options as $option) : ?>
              <tr>
                <td width="150" bgcolor="#FFFFFF" class="th1"><?=$option['option_title']?></td>
                <td width="160" align="left" bgcolor="#FFFFFF"><?=$option['option_value']?></td>
                <td align="center" bgcolor="#FFFFFF"><a href="<?=UE_Url::make("$app/$ctl/$act/$option[option_type]")?>"><?=$option['option_type_name']?></a></td>
                <td align="center" bgcolor="#FFFFFF">
                    <?php if($option['option_input_type'] == 'text'): ?>文本框<?php endif;?>
                    <?php if($option['option_input_type'] == 'textarea'): ?>多行文本框<?php endif;?>
                    <?php if($option['option_input_type'] == 'select'): ?>选择菜单<?php endif;?>
                    <?php if($option['option_input_type'] == 'radio'): ?>单选框<?php endif;?>
                    <?php if($option['option_input_type'] == 'checkbox'): ?>复选框<?php endif;?>
                    <?php if($option['option_input_type'] == 'file'): ?>文件<?php endif;?>
                </td>
                <td align="center" bgcolor="#FFFFFF"><?=$option['option_order']?></td>
                <td align="left" bgcolor="#FFFFFF"><?=$option['option_note']?>&nbsp;</td>
                <td align="center" bgcolor="#FFFFFF">
                    [<a href="<?=UE_Url::make("$app/$ctl/setting/{$option['option_type']}#{$option['option_name']}")?>" >设置值</a>]
                    [<a href="<?=UE_Url::make("$app/$ctl/setAttr/{$option['option_name']}")?>">编辑属性</a>]
                </td>
              </tr>
              <?php endforeach; ?>
              <tr>
                <td class="nobd" colspan="7" align="center" valign="top" bgcolor="#FFFFFF"><?=$paging?></td>
            </tr>
              <?php else : ?>>
              <tr>
                <th colspan="7" align="center" valign="top" bgcolor="#FFFFFF"><h3 style="margin:8px;">{lang NO_CONTENT_MSG}</h3></th>
              </tr>
              <?php endif;?>
          </table>
      </form>
    </div>
</div>

<?php include $this->footer();?>